<template>
	<view class="container">

		<button class="city-list" type="primary" @click="goCity">{{city.cityname}}</button>

     KZH; ---11:27
	 kzh  ---11：32
		<!-- 搜索页面按钮 -->
		<view class="box" @click="goSearch">
			<image src="../../static/gosearch.svg" mode="aspectFit"></image>
			<input type="text" value="" placeholder="请输入搜索内容" />
		</view>
		<!-- /搜索页面按钮 -->



	</view>

</template>

<script>
	export default {
		data() {
			return {
				city: "选择城市",
				height: 0
			}
		},
		onLoad() {
			var _this = this;
			console.log("小雨来了");
			// 获取手机状态栏高度
			uni.getSystemInfo({
				success: function(data) {
					// 将其赋值给this
					_this.height = data.statusBarHeight;
				}
			})
			this.city = uni.getStorageSync("city")
		
		},
		mounted() {
			console.log("hhh")
            console.log("hhsdasdasdh")
            console.log("hhh")
		},
		methods: {
			// 进入搜索页面点击事件
			goSearch() {
				uni.navigateTo({
					url: "../index/index"
				})
			},

			// 进入城市选择页面
			goCity() {
				
				uni.navigateTo({
					url: "../city-search/city-search"
				})
				
			}
		}
	}
</script>

<style>
	.container {
		display: flex;
		justify-content: space-around;

	}

	.city-list {
		flex: 1;
		border-radius: 30rpx;
		font-size: 30rpx;
	}


	.box {
		display: flex;
		flex: 4;
		background-color: #C0C0C0;
		border-radius: 30rpx;
	}

	.box image {
		margin: 25rpx 0 0 25rpx;
		width: 30rpx;
		height: 30rpx;
	}

	.box input {
		margin: 18rpx 0 0 25rpx;
	}
</style>
